import { ProCard, ProColumns, ProTable } from "@ant-design/pro-components";

const App:React.FC=()=>{
     interface DataType{
        code?:string,name?:string,type?:string,status?:string
     };

     const columns:ProColumns<DataType>[]=[
        {dataIndex:'code',title:'编码'},{dataIndex:'name',title:'名称'},
        {dataIndex:'type',title:'类型'},{dataIndex:'status',title:'状态'},
     ];

     const tdata:DataType[]=[
        {code:'A001',name:'保养等级A',type:'设备保养',status:'正常'},
        {code:'A002',name:'保养等级B',type:'设备保养',status:'正常'},
        {code:'A003',name:'保养等级C',type:'设备保养',status:'正常'},
        {code:'B001',name:'维修等级A',type:'设备维修',status:'正常'},
        {code:'B002',name:'维修等级B',type:'设备维修',status:'正常'},
        {code:'B003',name:'维修等级C',type:'设备维修',status:'正常'},
        {code:'C001',name:'库存等级A',type:'备品备件',status:'正常'},
        {code:'C002',name:'库存等级B',type:'备品备件',status:'正常'},
        {code:'C003',name:'库存等级C',type:'备品备件',status:'正常'},
     ];

    return <>
         <ProCard title='等级管理' style={{height:700}}
         >
             <ProTable<DataType>
                search={false}
                options={false}
                columns={columns}
                dataSource={tdata}

                />
         </ProCard>
    </>;
};

export default App;